/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.asset.contract.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.asset.entity.AssetContract;

import java.util.List;

/**
 * 合同管理
 *
 * @author liyue
 * @date 2021-11-18 18:45:12
 */
public interface AssetContractService extends IService<AssetContract> {

	/**
	 * 查询合同信息
	 * @param query 查询构造器
	 * @param type 类型
	 * @return 合同集合
	 */
	List listContract(QueryWrapper<AssetContract> query, String type);


	/**
	 * 查询合同年份树结构
	 * @return 合同年份树结构
	 */
	List<Tree<Integer>> selectTree();

	/**
	 * 查询合同树结构
	 * @return 合同树结构
	 */
	List<Tree<Long>> selectContractTree(QueryWrapper<AssetContract> query);
}
